<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="UTF-8">
        <title>第三方登录完善信息 - {:C('c_title')}</title>
        <link rel="stylesheet" type="text/css" href="__CSS__/home/binding.css"/>
        <script type="text/javascript" src="__JQ__"></script>
        <script src="__JS__/taodudu.lib.js" type="text/javascript" charset="utf-8"></script>
        <script src="__JS__/Validform_v5.3.2.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript" src="__JS__/jquery.form.js"></script>
        <script type="text/javascript" src="__JS__/layer/layer.js"></script>
        <script type="text/javascript" src="__JS__/jquery.layer.js"></script>
    </head>
    <body>
        <div class="box box_logo">
            <div class="box-main">
                <a href="/"><img src="__IMG__/home/logo.png"/></a>
            </div>
        </div>
        <div class="box">
            <div class="box-main binding_mian">
                <ul class="binding_mian_title">
                    <li class="on">已有淘嘟嘟账号，请绑定</li>
                    <li>没有淘嘟嘟账号，请注册!</li>
                </ul>
                <div class="binding_main_data">
                    <img src="{$user_sns_info.head}" width="28" height="28">
                    Hi, {$user_sns_info.nick} 欢迎来到淘嘟嘟
                </div>
                <div class="binding_form">
                    <div class="bing_form_reg">
                        <form action="{:U('Qlogin/dobind')}" method="post" id="bindFrom" name="bindFrom">
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="mobile">用户名：</label>
                                    <input class="form-cake" name="mobile" id="mobile" placeholder="可以是您注册过的手机或者邮箱" datatype="*" nullmsg="请输入账号！" >
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="password">密码</label>
                                    <input class="form-cake" name="password" id="password" datatype="*" placeholder="密码" type="password">
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="pull_left">
                                <input class="btn-yarpai" type="submit" value="确定绑定"/>
                            </div>
                        </form>
                    </div>
                    <div class="bing_form_reg" style="display: none;">
                        <form action="{:U('Qlogin/doregister')}" method="post" id="myform" name="myform">
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="mobile">手机号</label>
                                    <input class="form-cake" name="mobile" id="mobile" placeholder="手机号" ajaxurl="{:U('Public/phone_verification')}" maxlength="11" datatype="m" nullmsg="请输入手机号！" errormsg="手机的格式不正确！" />
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="mobile"></label>
                                    <input type="text" class="btn btn-default btn-orange" value="获取手机验证码"  name="btnSubmit"  id="zphone"  onClick="get_regist_mobile_code();">
                                </div>
                            </div>
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="vcode">验证码</label>
                                    <input class="form-cake" name="vcode" datatype="*6-16" id="vcode" placeholder="验证码">
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="password">密码</label>
                                    <input class="form-cake" name="password" datatype="*6-16" id="password" placeholder="密码" type="password">
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="inputs">
                                <div class="pull_left">
                                    <label class="control-label" for="repassword">确认密码</label>
                                    <input class="form-cake" name="repassword" datatype="*6-16" recheck="password" nullmsg="请再输入一次密码！" errormsg="您两次输入的账号密码不一致！" id="repassword" placeholder="确认密码" type="password">
                                </div>
                                <div class="pull_left"><span class="Validform_checktip"></span></div>
                            </div>
                            <div class="pull_left">
                                <input type="hidden" name="username" value="{$user_sns_info.nick}">
                                <input type="hidden" name="reg_type" value="{$user_sns_info.type.strtolower}">
                                <input type="hidden" name="avatar" value="{$user_sns_info.head}">
                                <input class="btn-yarpai" type="submit" value="注册并绑定"/>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div style="clear: both"></div>
        <div class="site-footer">
            <div class="footer-related">
                <include file="Public/bootom_a" />
                <include file="Public/bootom_b" />
                <include file="Public/bootom_c" />
            </div>
        </div>
    </body>
</html>
<script type="text/javascript">
    $(function () {
        $("#myform").Validform({
            tiptype:2,
            showAllError:true
        });
        $("#bindFrom").Validform({
            tiptype:2,
            showAllError:true
        });
        $('#myform').layer({});
        $('#bindFrom').layer({});
    })

    $(".binding_mian_title li").click(function () {
        $(".binding_mian_title li").removeClass("on");
        $(this).addClass("on")
        $(".bing_form_reg").hide();
        $(".bing_form_reg").eq($(this).index()).show();
    })
</script>